// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import Vuex from 'vuex'
import store from './store/store'
import http from './http/index'
import Filters from './assets/js/filters/filters'
import './assets/css/aui/aui.css'
import './assets/css/aui/aui-flex.css'
Vue.config.productionTip = false
Vue.prototype.$http = http
/**
 * 注册通用过滤器
 */
Object.keys(Filters).forEach(key => {
  Vue.filter(key, Filters[key])
})
/**
 * 所有url拦截
 */
router.beforeEach((to, from, next) => {
  store.state.loginUserInfor = {}
  next()
})
/* eslint-disable no-new */
Vue.use(Vuex)
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
